﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Infrastructure.Interfaces;

namespace Infrastructure.Services
{
    public class UserAccountValidator : IUserAccountValidator
    {
        private const int MinPasswordLength = 6;

        public bool IsUsernameValid(string userName)
        {
            if (string.IsNullOrEmpty(userName) || string.IsNullOrWhiteSpace(userName))
                return false;
            return true;
        }

        public bool IsPasswordValid(string password)
        {
            if (string.IsNullOrEmpty(password) || string.IsNullOrWhiteSpace(password))
                return false;
            return password.Length >= MinPasswordLength;
        }
    }
}
